---
title: shared
---

`shared` is a group of utilities that are shared between runner, nodes, and triggers. It includes utilities for logging, error handling, and other common tasks and classes.

---

<Tip> For a complete reference visit [runner](/docs/ref/shared/src/README)</Tip>

# **Guide to Contributing to shared in Blok **

<Tip> Make sure you follow the recommendations on how to set up local environment and steps to complete before committing your changes. To learn more [visit](/docs/c/overview/how-to-contribute)</Tip>

The **Shared** module in `Blok` contains common utilities used across the framework, including the **Runner, Nodes, and Triggers**. These utilities handle **logging, error management, and other core functionalities**. This guide will help you contribute to the shared utilities effectively.

---

## **Repository & Setup**  
The `Blok` framework is hosted at:  
🔗 [GitHub Repository](https://github.com/deskree-inc/blok.git)  

### Clone the Repository**  
```bash
git clone https://github.com/deskree-inc/blok.git
cd blok/core/shared
npm install
```

---

## **Adding Features or Fixing Bugs**
### **1. Create a Feature Branch**  
```bash
git checkout -b feature/improve-logging
```

### **2. Make Your Changes**
Modify the relevant files inside `/core/shared/src/`.  
Example: **Adding a debug log level in `logger.ts`**  
```typescript
export function logDebug(message: string) {
  if (process.env.LOG_LEVEL === 'debug') {
    console.debug(`[DEBUG]: ${message}`);
  }
}
```

### **3. Test Your Changes**  
Run unit tests to ensure no regressions:  
```bash
npm test
```

### **4. Submit a Pull Request**  
Push your changes and open a PR on GitHub.  
```bash
git push origin feature/improve-logging
```
In the PR description, include:  
- **What was changed?**  
- **Why was it changed?**  
- **How was it tested?**  

---

## **Best Practices**
✅ Keep utilities **generic and reusable**.  
✅ Write **unit tests** for all new functions.  
✅ Follow **consistent logging and error handling patterns**.  
✅ Ensure **backward compatibility** with existing modules.  

---

## **Final Notes**
Contributing to **Shared** ensures that all components of `Blok` (Runner, Nodes, and Triggers) function smoothly and consistently. If you have any questions, **open an issue or PR** on GitHub! 🚀  

🔗 [GitHub Repository](https://github.com/deskree-inc/blok.git)  
```